package rabbitmq

import (
	"fmt"
)

type ConsumeStrategy interface {
	Consume(msg QueueBo)
}

// 日志消费者
type LoggerConsumer struct{}

func (log *LoggerConsumer) Consume(msg QueueBo) {
	fmt.Println("Logger Consumer" + msg.QueueName)
}

// 延迟消费
type DelayConsumer struct{}

func (delay *DelayConsumer) Consume(msg QueueBo) {
	fmt.Println("Delay Consumer" + msg.QueueName)
}

// 数据延迟双删
type DeleteConsumer struct{}

func (delete *DeleteConsumer) Consume(msg QueueBo) {
	fmt.Println("Delete Consumer" + msg.QueueName)
}

// 执行具体消费策略
type RabbitContext struct {
	consumerMap map[string]ConsumeStrategy
}
